Repository navigation
fix: honor the polling interval while the live command result file is missing - #768
Open
pcbeingused333 wants to merge 1 commit into
Open
pcbeingused333 wants to merge 1 commit into
pcbeingused333 wants to merge 1 commit into
Conversation
… missing read_from_file only slept in its exception handlers, but a missing result file makes cat exit nonzero with empty stdout without raising, so the loop re-ran docker exec back to back until the timeout. Sleep for the interval after an empty read.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #748
DockerManager.read_from_fileonly slept inside its exception handlers. When the result file does not exist yet,catexits nonzero with empty stdout, butPopendoes not raise, so the loop skipped the sleep and re-randocker execback to back until the timeout.Sleep for the configured
intervalafter an empty read. A result that is already available still returns immediately, without sleeping.Testing and validation
Two tests in
tests/components/docker/test_docker_manager.py: one asserts the interval is slept while the result file is empty (fails before the change, passes after) and one asserts a ready result returns without sleeping. The whole file passes (21 tests).This change was prepared with assistance from Claude (Anthropic).